﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using DTO;
using BUS;

namespace WebSieuThi.QuanLi.QuiDinhKhachHangAjax
{
    public partial class capnhapquidinhkh : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

            int tonggt = int.Parse(Request.QueryString["tonggt"].ToString());
            int diemcong = int.Parse(Request.QueryString["diemcong"].ToString());
            int diemgiamgia = int.Parse(Request.QueryString["diemgiamgia"].ToString());
            double phantram = double.Parse(Request.QueryString["phantram"].ToString());

            ThamSo ts = new ThamSo();

            ts.TongGiaTriQD = tonggt;
            ts.SoDiemCongThem = diemcong;
            ts.SoDiemDeGiamGia = diemgiamgia;
            ts.PhanTramGiam = phantram;

            bool b = ThamSoBUS.Sua(ts);

            if (b)
            {
                Response.Write("Thay đổi thành công!");
            }
            else
            {
                Response.Write("Xãy ra lỗi khi thay đổi quy định!");
            }


        }
    }
}
